import requests

from api.buyer.login_api import BuyerLoginAPI
from api.manager.manager_api import ManagerApi


# session = requests.Session()

"""买家登录"""
# def login(username="daniu", password="c3572489380a656bec618375e5085db4"):
url = "http://59.36.173.55:7002/passport/login"
data = {
    "username": "shamo123",
    "password": "1d3778364d46a1540265581868b4d72d",
    "captcha": "1512",
    "uuid": "jdajhjakd"
}
resp = requests.post(url, data=data)
print(resp.json())
#     global token
#     token = resp.json()["access_token"]

# class Dome(BuyerLoginAPI):
#     def __init__(self):
#         super().__init__()
#         self.url = f'{self.host}members/addresses'


# def Manager(username="admin", password="78b157cf49d312ecf69d1335e8b589ef"):
# url = "http://59.36.173.55:7004/admin/systems/admin-users/login"
# data = {
#     "username": "admin",
#     "password": "78b157cf49d312ecf69d1335e8b589ef",
#     "captcha": "1512",
#     "uuid": "jdajhjakd"
# }
# resp = requests.get(url=url, params=data)
# print(resp.json())
        # return resp


# url = "http://59.36.173.55:7003/seller/login"
# data = {
#     "username": "shamoseller",
#     "password": "fafd8b5f5d11048e8078b66ab075acb3",
#     "captcha": "1512",
#     "uuid": "jdajhjakd"
# }
# resp = requests.get(url=url, params=data)
# print(resp.json())
# if __name__ == '__main__':
#     # resp = Dome().request()
#     resp = Manager(username="admin", password="78b157cf49d312ecf69d1335e8b589ef")
#     print(resp.json())